Move query rewriting into search backend
authorErik Bernhardson <ebernhardson@wikimedia.org>
Tue, 28 Jul 2015 18:26:21 +0000 (11:26 -0700)
committerErik Bernhardson <ebernhardson@wikimedia.org>
Tue, 1 Sep 2015 05:41:05 +0000 (22:41 -0700)
commit23acf6e70f013b84110b8e6abdde40273e29018a
treed4d8142a1720bf6101dee5d46882b36872e47fd8
parent3de58a4990591bb5e85d8f2454144642c54aac5b
Move query rewriting into search backend

Special:Search recently gained query rewriting behavior when the
original query returned no results.  We want to expose this query
rewriting behavior to both api and web requests.  Additionally we
want to be able to test different configurations of the query
suggestions.  This patch allows for both by moving the rewriting
from core into the search backend.

This defaults to enabled for Special:Search, and disabled for
ApiQuerySearch. Internal code that talks to the search backend
needs to specifically enable this feature.

Bug: T106888
Change-Id: I0a8f75759f9148f53358707369b8a7128215de86
includes/api/ApiQuerySearch.php
includes/api/i18n/en.json
includes/api/i18n/qqq.json
includes/search/SearchResultSet.php
includes/specials/SpecialSearch.php
tests/phpunit/includes/specials/SpecialSearchTest.php